feat: add uv tool install support (dev editable + prod) with self-update#3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class packaging and installation support for Syncwheel via uv tool install, while extending the existing self-update/status machinery to correctly detect and handle uv-tool installs vs git checkouts vs standalone script usage.
Changes:
- Introduce
pyproject.toml+ console-script entry point (syncwheel) while preservingpython3 scripts/syncwheel.py ...execution. - Extend install-kind detection and self-update logic to support uv-tool installs (remote VERSION check +
uv tool upgrade). - Add an idempotent
scripts/install.shinstaller and update docs/changelog/version to0.18.0.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| VERSION | Bumps release version to 0.18.0. |
| scripts/syncwheel.py | Adds packaging-aware version resolution, uv-tool detection, remote VERSION fetching, and uv-based self-update flow. |
| pyproject.toml | Defines setuptools build + syncwheel console script pointing to syncwheel:main. |
| scripts/install.sh | Adds an installer for uv tool installs (prod + editable dev). |
| tests/test_syncwheel.py | Adds tests for version reporting, install-kind detection, uv self-update command selection, and remote VERSION parsing. |
| README.md | Updates install and self-update documentation for uv tool workflows and preserves legacy script usage guidance. |
| CHANGELOG.md | Documents 0.18.0 changes (uv packaging/install + install-kind-aware self update). |
| skills/syncwheel/SKILL.md | Updates skill documentation to prefer PATH-based syncwheel when installed via uv tool. |
| .gitignore | Ignores *.egg-info/ from setuptools builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+82
to
+90
| def resolve_runtime_version(root=None): | ||
| if root: | ||
| version = read_version_file(Path(root) / 'VERSION') | ||
| if version: | ||
| return version | ||
| version = read_version_file(SOURCE_ROOT / 'VERSION') | ||
| if version: | ||
| return version | ||
| return package_metadata_version() or '0.6.0' |
Comment on lines
+51
to
+58
| if command -v curl >/dev/null 2>&1; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| elif command -v wget >/dev/null 2>&1; then | ||
| wget -qO- https://astral.sh/uv/install.sh | sh | ||
| else | ||
| echo "error: --with-uv requires curl or wget" >&2 | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyproject.tomlpackaging that exposesscripts/syncwheel.pyas thesyncwheelconsole script via setuptoolspy-modules, with no file moves and continued support forpython3 scripts/syncwheel.py ....uv tool install --editable /path/to/syncwheelfor editable development installs anduv tool install "git+https://github.com/NestDevLab/syncwheel"for production installs.git-cloneinstalls fromuv-toolinstalls.self check-updatereads the remoteVERSIONfile directly andself updaterunsuv tool upgrade syncwheel.scripts/install.shfor idempotent uv-based installs, including optional explicit uv bootstrap and editable install support.VERSIONto0.18.0and update the changelog/docs.Tests
python3 -m unittest discover -s tests -v(76 tests passed)python3 scripts/check-version-bump.py --base origin/main